package com.sdp.lease.db.l_eq_lease_info.service.impl;

import com.sdp.lease.db.l_eq_lease_info.entity.LEqLeaseInfo;
import com.sdp.lease.db.l_eq_lease_info.mapper.LEqLeaseInfoMapper;
import com.sdp.lease.db.l_eq_lease_info.service.ILEqLeaseInfoService;
import com.sdp.lease.utils.LeaseConstants;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2024-07-27
 */
@Service
public class LEqLeaseInfoServiceImpl extends ServiceImpl<LEqLeaseInfoMapper, LEqLeaseInfo> implements ILEqLeaseInfoService {

	@Override
	public int eqLeaseInfoNumber() {
		LambdaQueryWrapper<LEqLeaseInfo> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(LEqLeaseInfo::getApplyState, LeaseConstants.申请状态_申请中.getCode());
		queryWrapper.or().eq(LEqLeaseInfo::getIsHandle, LeaseConstants.否.getCode());
		return count(queryWrapper);
	}

}
